use super::Result;

pub fn string_from_bytes(bytes: &[u8]) -> Result<String> {
    let str: &str = str_from_bytes(bytes)?;
    Ok(str.to_owned())
}

pub fn str_from_bytes(bytes: &[u8]) -> Result<&str> {
    Ok(std::str::from_utf8(bytes)?)
}
